import { addMinute } from "./addMinute"

export function addHour(num: string | number = 1, date: Date = new Date()) {
  num = Number(num)
  if (num > parseInt(num as any)) {
    return addMinute(num * 60, date)
  }
  date.setHours(date.getHours() + num)
  return date
}